There are certain situations where files that include tab characters may not be supported or displayed correctly on other platforms. In order to allow the user to continue to make use of the indenting features in the code editor, Programmer Studio provides the option to convert each tab character to a sequence of spaces.
The results are visually identical; however the file now contains a number of spaces where previously a single tab character may have been present.
File Types provide two options for the dynamic conversion of tab characters, Insert Tabs as Spaces automatically converts a tab key press into sequential spaces, Save Tabs as Spaces converts any remaining tab characters when saving. As these options are specified in the File Type settings, they are applied to a file when it is opened and cannot be changed once the file is open. To convert existing tab characters into spaces, use the Untabify feature.
Note |
The Insert Tabs as Spaces feature does not convert tab characters copied from the clipboard. To ensure that all spaces are removed, the Save Tabs as Spaces option should be enabled. |
The Untabify feature converts each tab character in the current document or selection into the correct number of spaces required to reach the next tab position. By default, the Untabify feature will use the currently defined tab settings, although theses may be overridden.
If the tab size and positions are not changed from those used in the current file, there will be no visual change in the display of the file contents.
The Tabify feature converts sequences of spaces into single tab characters based on a specified tab size. The Tabify feature scans the current document or selection to determine the most common size of a tab stop currently represented by spaces.